package container

type ListVisitor[T any] func(T) (shouldContinue bool)
type ListAcceptor[T any] func(T) (accept bool)

type ListIterable[T any] interface {
	Iterate(v ListVisitor[T])
}

type MapVisitor[K comparable, V any] func(key K, value V) (shouldContinue bool)
type MapAcceptor[K comparable, V any] func(key K, value V) (accept bool)

type MapIterable[K comparable, T any] interface {
	Iterate(v MapVisitor[K, T])
}
